

#ifndef __MESSAGE_POOL_H__
#define __MESSAGE_POOL_H__

#include "MessageDefine.h"

#ifdef __cplusplus
extern "C" {
#endif

void MsgPool_Init(void);
Message_T* Message_New(MsgBusAddr_T dest, MsgBusAddr_T src, MsgType_T type, MsgAttr_T attr);
Message_T* Message_Clone(Message_T* msg);
void Message_Del(Message_T* msg);

static inline void Message_SetData(Message_T* msg, void* data){
	msg->attr |= 0x80;
	msg->data = data;
}

static inline void Message_SetValue(Message_T* msg, uint32_t val){
	msg->attr &= 0x7F;
	msg->val = val;
}

#ifdef __cplusplus
}
#endif

#endif



